﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/Default.Master" AutoEventWireup="true" CodeBehind="OperationLogViewer.aspx.cs" Inherits="Fynd.Hermes.Web.Pages.OperationLogViewer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderHtmlHead" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            $("#datepicker").datepicker({
                altField: "#textDate",
                dateFormat: "yy-mm-dd",
                defaultDate: '<%=DateFilterValue.ToString("yyyy-MM-dd") %>'
            });
        });
  </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderMain" runat="server">
    <table>
        <tr style="vertical-align:top;">
            <td>
                <form action="OperationLogViewer.aspx" method="get">
                <p>
                    按日期筛选<input id="textDate" name="date" type="text" value="" />
                    <span id="datepicker"></span>
                </p>
                <p>
                    <input type="text" name="name" value="<%=PeopleNameFilterValue %>" />
                </p>
                <p>
                    <button type="submit">查询</button>
                </p>
                </form>
            </td>
            <td style="width:100%;">
                <div class="ui-widget-content">
<%
    if (ResultList.Count <= 0)
    {
%>
        <p class="ui-state-highlight">
            <strong>
            筛选条件：<%=DateFilterValue.ToString("yyyy-MM-dd") %>，<%=String.IsNullOrEmpty(PeopleNameFilterValue) == true ? "" : PeopleNameFilterValue%>，没有找到任何操作日志。</strong>
        </p>
<%
    }
    else
    {
%>
    <table style="width:100%;">
        <tr>
            <th>登录帐号</th>
            <th>真实姓名</th>
            <th>操作时间</th>
            <th>操作内容</th>
            <th>IP地址</th>
        </tr>
<%
        foreach (Fynd.Hermes.Web.Objects.OperationLog aLog in ResultList)
        {    
%>
                <tr>
                    <td><%=aLog.UserLoginName%></td>
                    <td><%=aLog.OperatorTrueName%></td>
                    <td><%=aLog.OperationDate%></td>
                    <td><%=aLog.Message%></td>
                    <td><%=aLog.ClientIP %></td>
                </tr>
<%
                     
        } 
%>
    </table>
<%
    } 
%>
                </div>
            </td>
        </tr>
    </table>
</asp:Content>
